#include <iostream>

template<typename T>
class List
{
    struct Link
    {
        Link* pre, *suc;
        T val;
        Link(Link* p, Link* s, const T& v):pre(p), suc(s), val(v){}
    };
    Link* head_;
public:
    List():head_(0){}
    List(const T& t):head_(new Link(0, 0, t)){}
    void print_all(){
            for(Link* p = head_; p; p = p->suc)
                std::cout << p->val << std::endl;
    }
};
int main()
{
    List<int> a;
    a.print_all();
}


    
    
    
    
        
        
        
